package com.kkb.dtg.config;

import com.kkb.dtg.Interceptor.InterceptorLogin;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 何世鹏
 * @date 2021/04/21/18:14
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer{

    /**
     * 注册自定义拦截器
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new InterceptorLogin()).addPathPatterns("/**");
    }
}


